<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生端</title>
    <link rel="stylesheet" href="/css/home.css">
</head>
<body>
<div class="home">
    <header>
        欢迎学号/工号：<%=uid%>，使用学生管理系统，当前您的身份是：<%=posts%>
        <span>【<a href="/logout">退出登录</a>】</span>
    </header>
    <article>
        <ul>
            <li><a href="">查询学生成绩</a></li>
            <li><a href="/checkpwd">更改密码</a></li>
        </ul>
        <aside>
            <div class="home_table">
            <table class="tab1" cellpadding="0" cellspacing="0">
                <tr>
                    <td>姓名：</td>
                    <td><%= result[0].stu_name%></td>
                    <td colspan="2">性别：</td>
                        <%if(result[0].gender==1){%>
                        <td>男</td>
                        <%}else{%>
                        <td>女</td>
                        <%}%>
                    <td>年龄：</td>
                    <td><%= result[0].age%></td>
                </tr>
                <tr>
                    <td>出生年月：</td>
                    <td colspan="2"><%= moment(result[0].birtmp).format('Y-M')%></td>

                     <td colspan="2">所属专业：</td>
                    <td><%= result[0].sub_name%></td>
                </tr>
            </table>
            <table class="tab2" cellpadding="0" cellspacing="0">
                <%scores.forEach((item,index)=>{%>
                <tr class="tr1">
                    <td colspan="8">第<%=index+1%>学期期末</td>
                </tr>
                <tr class="tr2">
                    <%item.forEach((val)=>{%>
                    <td><%=val.class_name%></td>
                    <td><%=val.scores%></td>
                    <%})%>
                </tr>
                <%})%>
            </table>
            </div>
        </aside>
    </article>
</div>
</body>
</html>